package com.jic.manager.service;

import com.jic.common.base.vo.Page;
import com.jic.common.base.vo.PageResult;
import com.jic.common.base.vo.RestResult;
import com.jic.conf.request.AddCmsPageRequest;
import com.jic.manager.entity.CmsPage;
import com.jic.manager.entity.vo.request.CmsPageRequest;

import java.util.List;

/**
* 页面信息表
* @author : 
* @email : 
* @since : 2020-03-05 12:00:37
* @version : v1.0.0
*/
public interface CmsPageService {

    long insert(CmsPage cmsPage);

    long delete(Long id);

    long update(CmsPage cmsPage);

    CmsPage queryByPrimaryKey(Long id);

    List<CmsPage> query(CmsPage cmsPage);

    PageResult<CmsPage> queryPage(CmsPage cmsPage, Page pageQuery);
    
    long lowerCmspage(Long id);

    PageResult<CmsPage> queryPages(CmsPage cmsPage, Page pageQuery);
    
    void copyCmsPage(Long id);
    
    Long useCmsPage(Long id);

    /**
     * 分页查询
     *
     * @param request
     * @return
     */
    List<com.jic.manager.entity.vo.response.CmsPageResponse> listCmsPageRecordPagination(CmsPageRequest request);

    /**
     * 分页查询总记录数接口
     * @param request 分页查询总记录数接口入参
     * @return String
     * @auther tzc
     * @date 2020-3-11 20:58:44
     */
    long listPageCount(CmsPage request) throws Throwable;

    /**
     * 不分页查询
     *
     * @param request
     * @return
     */
    List<CmsPage> listCmsPageAllRecord(CmsPage request);

    /**
     * 修改
     *
     * @param request
     * @return
     */
    long updateCmsPage(CmsPage request) throws Throwable;

    /**
     * 详情
     *
     * @param request
     * @return CmsPage
     *  @auther
     */
    CmsPage getCmsPage(CmsPage request);

    /**
     * 高校保存或修改接口
     * @param request 保存或修改入参
     * @return String
     * @auther tzc
     * @date 2020-3-11 20:58:44
     */
    long saveOrUpdateCmsPage(CmsPage request) throws Throwable;

    /**
     * 保存接口
     * @param request 保存入参
     * @return String
     * @auther tzc
     * @date 2020-3-11 20:58:44
     */
    long addCmsPage(CmsPage request) throws Throwable;

    /**
     * 删除接口
     * @param request 删除入参
     * @return String
     * @auther tzc
     * @date 2020-3-11 20:58:44
     */
    long deleteCmsPage(CmsPage request) throws Throwable;

    /**
     * 删除接口
     * @param request 删除入参
     * @return String
     * @auther tzc
     * @date 2020-3-11 20:58:44
     */
    long deleteCmsPageLogically(CmsPage request) throws Throwable;

    RestResult<String> addPage(AddCmsPageRequest addCmsModuleRequest);

    long updateSoldOut(CmsPage cmsPage);

}